<template>
  <div class="layout-container">
    <div class="layout-header">
      <slot name="header">
        <!-- 默认头-->
        <TheHeader />
      </slot>
    </div>
    <div class="layout-body">
      <div class="layout-body-left">
        <slot name="left">
          <!-- 默认左侧-->
          <TheSlider />
        </slot>
      </div>
      <div class="layout-body-center">
        <slot name="default" />
      </div>
    </div>
    <div class="layout-footer">
      <slot name="footer">
        <!-- 默认底部-->
        <TheFooter
      /></slot>
    </div>
  </div>
</template>
<style lang="scss" scoped>
.layout-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  .layout-header {
    height: 57px;
    border-bottom: 1px solid #eaecef;
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: #fff;
  }
  .layout-body {
    flex: 1;
    display: flex;
    z-index: 10;
    .layout-body-left {
      width: 280px;
      border-right: 1px solid #eaecef;
    }
    .layout-body-center {
      flex: 1;
      padding: 10px;
    }
  }
  .layout-footer {
    z-index: 20;
  }
}
</style>
